<% div_for(category) do %>
  <%= check_box_tag "question[category_ids][]", category.id, question.categories.include?(category) %>
  <%= category.name %>
<% end %>